package com.ctms.system.service.impl;

import com.ctms.system.dao.CourseScoreMapper;
import com.ctms.system.domain.CorrectsTaskDO;
import com.ctms.system.domain.CourseScoreDO;
import com.ctms.system.domain.TaskReleaseDO;
import com.ctms.system.service.CourseScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class CourseScoreServiceImpl implements CourseScoreService {
    @Autowired
    CourseScoreMapper courseScoreMapper;

    @Override
    public List<CourseScoreDO> selectAllCourseScore(Map<String, Object> map) {
        return courseScoreMapper.selectAllCourseScore(map);
    }

    @Override
    public int count(Map<String, Object> map) {
        return courseScoreMapper.count(map);
    }
    @Override
    public int insertCourseScore(CourseScoreDO courseScoreDO) {
        return courseScoreMapper.insertCourseScore(courseScoreDO);
    }

    @Override
    public List<TaskReleaseDO> selectAllTaskRelease(String taskCourse) {
        return courseScoreMapper.selectAllTaskRelease(taskCourse);
    }

    @Override
    public CorrectsTaskDO selectScoreByTidUserId(Integer tid, Integer userId) {
        return courseScoreMapper.selectScoreByTidUserId(tid, userId);
    }

    @Override
    public int updateCourseScore(CourseScoreDO courseScoreDO) {
        return courseScoreMapper.updateCourseScore(courseScoreDO);
    }
}
